package com.WFinstitute.serviceImpl;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.WFinstitute.domain.User;
import com.WFinstitute.repository.UserRepository;
import com.WFinstitute.service.UserService;



/***
 * 
 * @author cp.hlg.pf.kun
 * @time   2016-1-21 下午2:26:06
 */
@Service
public class UserServiceImpl implements UserService{
	@Resource
	private UserRepository  userRepository;

	public User login(String username,String password) {
		return userRepository.findUserByUsernameAndPassword(username, password);
	}

	@Override
	public void updateUser(User user) {
		userRepository.save(user);
		
	}
	

}
